cmake_minimum_required(VERSION 3.16 FATAL_ERROR)

# build output directories
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY $<0:>${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<0:>${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY $<0:>${CMAKE_BINARY_DIR}/lib)
set(CMAKE_PDB_OUTPUT_DIRECTORY $<0:>${CMAKE_BINARY_DIR}/lib)
set(EXECUTABLE_OUTPUT_PATH $<0:>${CMAKE_BINARY_DIR}/bin)

# cpp standard options
set(CMAKE_CONFIGURATION_TYPES Debug Release)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
set(CMAKE_CXX_STANDARD 17)
project(GLSLPractice)

if(MSVC)
  add_definitions(/DNOMINMAX)
endif()

# enable console logging
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
  add_definitions(-DSHADER_ENABLE_LOG)
endif()

# project subdirectories
add_subdirectory(Common)
# add_subdirectory(Chapter01)
# add_subdirectory(Chapter02)
# add_subdirectory(Chapter03)
# add_subdirectory(Chapter04)
# add_subdirectory(Chapter05)
# add_subdirectory(Chapter06)
# add_subdirectory(Chapter07)
# add_subdirectory(Chapter08)
# add_subdirectory(Chapter09)
# add_subdirectory(Chapter10)
add_subdirectory(Chapter11)